X-Git-Url: https://git.r.bdr.sh/rbdr/super-polarity/blobdiff_plain/f8aec187ea7dc410a32996406109f290f3199ffa..38c7d3f9eb7d63937c6654ff5dd6046ce02dd59c:/Super%20Polarity/SuperPolarity.cs diff --git a/Super Polarity/SuperPolarity.cs b/Super Polarity/SuperPolarity.cs index e5f565b..21d1ed4 100644 --- a/Super Polarity/SuperPolarity.cs +++ b/Super Polarity/SuperPolarity.cs @@ -20,13 +20,17 @@ namespace SuperPolarity public static GraphicsDeviceManager graphics; SpriteBatch spriteBatch; + public static int OutlierBounds; + public SuperPolarity() : base() { SuperPolarity.graphics = new GraphicsDeviceManager(this); SuperPolarity.graphics.PreferMultiSampling = true; Content.RootDirectory = "Content"; - ActorFactory.SetContentManager(Content); + ActorFactory.SetGame(this); + ParticleEffectFactory.SetGame(this); + ActorManager.SetGame(this); } /// @@ -38,6 +42,14 @@ namespace SuperPolarity protected override void Initialize() { base.Initialize(); + + OutlierBounds = 100; + + InputController.RegisterEventForButton("changePolarity", Buttons.A); + InputController.RegisterEventForKey("changePolarity", Keys.Z); + + InputController.RegisterEventForButton("shoot", Buttons.X); + InputController.RegisterEventForKey("shoot", Keys.X); } /// @@ -51,7 +63,9 @@ namespace SuperPolarity Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2); - ActorFactory.CreateMainShip(playerPosition); + Renderer.CheckIn(ActorFactory.CreateMainShip(playerPosition)); + Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Positive, new Vector2(200, 200))); + Renderer.CheckIn(ActorFactory.CreateShip(Ship.Polarity.Negative, new Vector2(400, 200))); } /// @@ -91,7 +105,7 @@ namespace SuperPolarity spriteBatch.Begin(); - ActorManager.Draw(spriteBatch); + Renderer.Draw(spriteBatch); spriteBatch.End();